-
Notifications
You must be signed in to change notification settings - Fork 161
ref: Replace hardcoded booleans with named macros #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
ab02e52 to
c0aaec7
Compare
|
@DavidMCerdeira looks good so far. Please let me know when its ready for final review |
c0aaec7 to
acf3c60
Compare
|
@josecm this is ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work ! LGTM
This commit updates mainly memory and bitmap operations to use named macros like MEM_FREE_PAGES, MEM_PPAGES_ALIGNED, and BITMAP_SET instead of raw boolean values. Signed-off-by: David Cerdeira <[email protected]>
acf3c60 to
8784329
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| #define VGIC_GICR_ACCESS true | ||
| #define VGIC_NO_GICR_ACCESS false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldnt these macros have surrounding parentheses?
| #define VGIC_GICR_ACCESS true | |
| #define VGIC_NO_GICR_ACCESS false | |
| #define VGIC_GICR_ACCESS (true) | |
| #define VGIC_NO_GICR_ACCESS (false) |
| #define VGIC_GICR_ACCESS true | ||
| #define VGIC_NO_GICR_ACCESS false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer the phrasing:
| #define VGIC_GICR_ACCESS true | |
| #define VGIC_NO_GICR_ACCESS false | |
| #define VGIC_GICR_ACCESS true | |
| #define VGIC_NOT_GICR_ACCESS false |
| #define MEM_PPAGES_ALIGNED true | ||
| #define MEM_PPAGES_NOT_ALIGNED false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #define MEM_PPAGES_ALIGNED true | |
| #define MEM_PPAGES_NOT_ALIGNED false | |
| #define MEM_PPAGES_ALIGNED_REQUIRED true | |
| #define MEM_PPAGES_ALIGNED_NOT_REQUIRED false |
| #define MEM_DONT_BROADCAST false | ||
|
|
||
| #define MEM_LOCKED true | ||
| #define MEM_UNLOCKED false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't love the "unlocked" phrasing. To keep consistent with the other macros maybe MEM_NOT_LOCKED
This commit updates mainly memory and bitmap operations to use named macros like MEM_DONT_FREE_PAGES, MEM_ALIGN_PPAGES, and BITMAP_DONT_SET instead of raw boolean values on respective functions.